const obj = {
  date: [1, 3, 5],
  teachers: {
    // '杨老师':"vue,react,nodejs",
    '停课': 'rest',
    '夏老师': 'wechat,safe',
    '厉老师': 'rn',
    '盛老师': 'vue,react,test,mp,webpack,perf,interview,other,end',
    '翠花老师': 'end'
  },
  details: [
    {
      title: 'vue01',
      content: 'Vue入门',
      catg: 'vue'
    },
    {
      title: 'vue02',
      content: 'Vue组件化设计',
      catg: 'vue'
    },
    {
      title: 'vue03',
      content: 'Vue全家桶实战',
      catg: 'vue'
    },
    {
      title: 'vue04',
      content: 'Vue电商项目实战01',
      catg: 'vue'
    },
    {
      title: 'vue05',
      content: 'Vue电商项目实战02',

      catg: 'vue'
    },
    {
      title: 'vue06',
      content: 'Vue电商项目实战02',

      catg: 'vue'
    },
    {
      title: 'vue07',
      content: 'Vue源码实战',
      catg: 'vue'

    },
    {
      title: 'React01',
      content: 'React入门',
      catg: 'react'

    },
    {
      title: 'React02',
      content: 'React组件化',
      catg: 'react'

    },
    {
      title: 'React03',
      content: 'React全家桶',
      catg: 'react'

    },
    {
      title: 'React04',
      content: 'dva实战',
      catg: 'react'

    },
    {
      title: 'React05',
      content: 'React电商项目实战01',
      catg: 'react'

    },
    {
      title: 'React06',
      content: 'React电商项目实战02',

      catg: 'react'

    },
    {
      title: 'React07',
      content: 'React电商项目实战03',
      catg: 'react'

    },
    {
      title: 'React08',
      content: '源码',
      catg: 'react'

    },

    {
      title: '小程序01',
      content: '小程序入门',
      catg: 'mp'
    },
    {
      title: '小程序02',
      content: '小程序入门',
      catg: 'mp'
    },
    {
      title: '小程序03',
      content: '小程序入门',
      catg: 'mp'
    },
    {
      title: '小程序04',
      content: '小程序入门',
      catg: 'mp'
    },
    {
      title: '微信公众号开发01',
      content: '微信公众号开发01',
      catg: 'wechat'
    },
    {
      title: '微信公众号开发02',
      content: '微信公众号开发02',
      catg: 'wechat'
    },
    {
      title: '微信公众号开发03',
      content: '微信公众号开发03',
      catg: 'wechat'
    },
    {
      title: '微信公众号开发04',
      content: '微信公众号开发04',
      catg: 'wechat'
    },
    {
      title: 'React-native01',
      content: 'React-native01',
      catg: 'rn'
    },
    {
      title: 'React-native02',
      content: 'React-native02',
      catg: 'rn'
    },
    {
      title: '停课',
      content: '停课',
      catg: 'rest'
    },
    {
      title: 'React-native03',
      content: 'React-native03',
      catg: 'rn'
    },

    {
      title: 'React-native04',
      content: 'React-native04',
      catg: 'rn'
    },
    {
      title: 'flutter实战',
      content: 'flutter实战 和RN对比 热门',
      catg: 'rn'
    },
    {
      title: '前端安全01',
      content: '前端安全01',
      catg: 'safe'
    },
    {
      title: '前端安全02',
      content: '前端安全02',
      catg: 'safe'
    },

    {
      title: '工程化01',
      content: '工程化01',
      catg: 'webpack'
    },
    {
      title: '工程化02',
      content: '工程化02',
      catg: 'webpack'
    },
    {
      title: '性能优化01',
      content: '性能优化01',
      catg: 'perf'
    },
    {
      title: '性能优化02',
      content: '性能优化02',
      catg: 'perf'
    },

    {
      title: '前端算法和数据结构',
      content: `前端算法实战科普
                排序,递归`,
      catg: 'other'
    },
    {
      title: '前端可视化',
      content: `前端可视化实战科普
        canvas
        可视化实战
      `,
      catg: 'other'
    },
    {
      title: '前端自动化测试',
      content: `前端自动化测试
        Vue自动化测试
        React自动化测试
        单元测试
        E2E测试
      `,
      catg: 'other'
    },
    {
      title: '面试01',
      content: '面试01',
      catg: 'interview'
    },
    {
      title: '面试02',
      content: '面试02',
      catg: 'interview'
    },

    {
      title: '结课',
      content: '结课',
      catg: 'end'
    }

  ]
}
const catgTeachers = {}
Object.entries(obj.teachers).forEach(val => {
  const [ name, catg ] = val
  catg.split(',').forEach(v => {
    catgTeachers[v] = name
  })
})
obj.details.map(v => {
  v.teacher = catgTeachers[v.catg]
  return v
})
export default obj
